package com.ddtech.business.course.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.course.entity.Course;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ddtech.business.course.query.CourseQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * 课程表 Mapper 接口
 * </p>
 *
 * @author bin_pu
 * @since 2023-02-06
 */
@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    /***
     * description: 课程列表查询
     * @param:  * @param page
     * @param courseQuery
     * @date: 2023-05-02
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    IPage<Map<String, Object>> pageCourseList(IPage page, @Param("courseQuery") CourseQuery courseQuery);


    /***
     * description: 课程列表查询-PC\移动端
     * @param:  * @param page
     * @param courseQuery
     * @date: 2023-05-02
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    IPage<Map<String, Object>> pageCourseListPc(IPage page, @Param("courseQuery") CourseQuery courseQuery);


    /***
     * description: 课程列表查询-PC\移动端,课程分类查询
     * @param:  * @param page
     * @param courseQuery
     * @date: 2023-05-02
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    IPage<Map<String, Object>> pageCourseListType(IPage page, @Param("courseQuery") CourseQuery courseQuery);

    /***
     * description: 课程列表查询-PC\移动端,课程搜索
     * @param:  * @param page
     * @param courseQuery
     * @date: 2023-05-02
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    IPage<Map<String, Object>> pageCourseListSearch(IPage page, @Param("courseQuery") CourseQuery courseQuery);

    /***
     * description:查询课程详情
     * @param:  * @param id
     * @date: 2023-05-26
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    Map<String, Object> getCourseInfo(String id,String userId);

    /***
     * description: 获取课程个人收藏
     * @param:  * @param id
     * @date: 2023-06-02
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    Map<String, Object> getSelfCollect(String userId,String busId);

    /***
     * description: 获取课程评分
     * @param:  * @param id
     * @date: 2023-06-02
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    Map<String, Object> getCourseGrade(String id);

}
